package com.yehongyu.mytools.basic.jdk5;

import java.util.ArrayList;
import java.util.List;

public class JDK5_002_ForEach {

	private final static List<String> lstResult;
	
	static {
		lstResult = new ArrayList<String>();
		lstResult.add("a");
		lstResult.add("b");
		lstResult.add("c");
	}
	public static void main(String[] args) {
		StringBuilder sb = new StringBuilder();
		//可用于For--Each循环的集合类型：
		//数组、java.util包下的各集合类型、枚举类型等
		for (String obj : lstResult) {
			sb.append(obj);
		}
		System.out.println(sb);
	}
}
